%%Get all the objects for the Squares Task
disp('loading task objects...')
dotsTheDrawablesManager.reset('serverMode', true, 'clientMode', true);
[squaresTree, squaresList] = configureSquaresTask;

%% build an object grapher and analyze the Squares Task objects
disp('scanning task objects...')
og = ObjectGrapher.withSeedObject(squaresList);

%% write a graph to an image file, in one of several layout styles
%	dot - "directed" graphs that emphasize hierarchy
%	neato - "undirected" graphs that try to spread objects evenly
%	fdp - "undirected" graphs that try to spread objects evenly
%	twopi - graphs with objects placed circular spokes
%   circo - graphs with objects placed on circle edges
disp('writing image...')
og.writeDotImage('circo');

disp('opening image...')
system(sprintf('open %s', fullfile(og.dotFilePath, og.imageFile)));